<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>
<head>
    <title>修改用户信息</title>
    <style type="text/css">
        .small {
            width: 120px;
            height: 120px;
        }
    </style>
</head>
<body>
<form action="useredit" method="post">
    <%--  将用户 id 隐藏在表单中  --%>
    <input type="hidden" value="${model.id}" name="id"/>
    <div class="item1">
        <div>个人头像：</div>
        <div>
            <img title="个人头像" alt="个人头像" class="small"
                 src="${model.imgUrl == "" ? 'assets/lib/img/admin1.png' : model.imgUrl}"/>
        </div>
    </div>
    <div class="item2">
        <div>账号：</div>
        <div>
            <input type="text" value="${model.username}" readonly disabled/>
        </div>
    </div>
    <div class="item3">
        <div>真实姓名：</div>
        <div>
            <input type="text" value="${model.name}" name="name"/>
        </div>
    </div>
    <div class="item9">
        <div>生日：</div>
        <div>
            <input type="date" value="${model.birthday}" name="birthday"/>
        </div>
    </div>
    <div class="item4">
        <div>年龄：</div>
        <div>
            <input type="text" value="${model.age}" name="age"/>
        </div>
    </div>
    <div class="item8">
        <div>籍贯：</div>
        <div>
            <select name="province">
                <option value="四川" ${model.province == "四川"? 'selected':''}>四川</option>
                <option value="陕西" ${model.province == "陕西"? 'selected':''}>陕西</option>
            </select>

        </div>
    </div>
    <div class="item6">
        <div>性别：</div>
        <div>
            <input type="radio" name="gender" value="男" ${model.gender == '男'? 'checked' : ''}>男
            <input type="radio" name="gender" value="女" ${model.gender == '女'? 'checked' : ''}>女
        </div>
    </div>
    <div class="item7">
        <div>爱好：</div>
        <div>
            <input type="checkbox" name="hobby" value="写程序" ${fn:contains(model.hobby, "写程序")? "checked" :''}/>写程序
            <input type="checkbox" name="hobby" value="看书" ${fn:contains(model.hobby, "看书")? "checked" :''}/>看书
            <input type="checkbox" name="hobby" value="玩游戏" ${fn:contains(model.hobby, "玩游戏")? "checked" :''}/>玩游戏
        </div>
    </div>
    <button type="submit">保存</button>
</form>
</body>
</html>
